home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(load){
- function calculate_x(t)
- {
- return this.control_points[0].x * ((1 - t) * (1 - t) * (1 - t) * (1 - t)) + this.control_points[1].x * (2 * t * (1 - t) * (1 - t) * (1 - t)) + this.control_points[2].x * (6 * t * t * (1 - t) * (1 - t)) + this.control_points[3].x * (2 * t * t * t * (1 - t)) + this.control_points[4].x * (t * t * t * t);
- }
- function calculate_y(t)
- {
- return this.control_points[0].y * ((1 - t) * (1 - t) * (1 - t) * (1 - t)) + this.control_points[1].y * (2 * t * (1 - t) * (1 - t) * (1 - t)) + this.control_points[2].y * (6 * t * t * (1 - t) * (1 - t)) + this.control_points[3].y * (2 * t * t * t * (1 - t)) + this.control_points[4].y * (t * t * t * t);
- }
- base_points = new Array();
- var j = 0;
- while(j < 5)
- {
- base_points[j] = new Object();
- j++;
- }
- base_points[0].x = 139.95;
- base_points[0].y = 8;
- base_points[1].x = -146;
- base_points[1].y = 426.95;
- base_points[2].x = 317.95;
- base_points[2].y = 553.95;
- base_points[3].x = 663.95;
- base_points[3].y = 565.95;
- base_points[4].x = 517.95;
- base_points[4].y = -4;
- control_points = new Array();
- var k = 0;
- while(k < 5)
- {
- control_points[k] = new Object();
- control_points[k].x = base_points[k].x;
- control_points[k].y = base_points[k].y;
- k++;
- }
- num_times = 5;
- current_time = 0;
- t = 0;
- inc = 0.01;
- active = false;
- }
-